<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="120px">
      <el-form-item label="Media Code">
        <el-input v-model="form.code" style="width: 400px"/>
        <el-button type="primary" @click="onSubmit">保存</el-button>
<!--        <el-button @click="onCancel">Cancel</el-button>-->

      </el-form-item>
<!--      <el-form-item label="Activity zone">-->
<!--        <el-select v-model="form.region" placeholder="please select your zone">-->
<!--          <el-option label="Zone one" value="shanghai" />-->
<!--          <el-option label="Zone two" value="beijing" />-->
<!--        </el-select>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="Activity time">-->
<!--        <el-col :span="11">-->
<!--          <el-date-picker v-model="form.date1" type="date" placeholder="Pick a date" style="width: 100%;" />-->
<!--        </el-col>-->
<!--        <el-col :span="2" classmgt="line">-</el-col>-->
<!--        <el-col :span="11">-->
<!--          <el-time-picker v-model="form.date2" type="fixed-time" placeholder="Pick a time" style="width: 100%;" />-->
<!--        </el-col>-->
<!--      </el-form-item>-->

<!--      <el-form-item label="Activity type">-->
      <el-form-item label="平台">
        <el-radio-group v-model="form.platform">
          <el-radio label="1" >电信</el-radio>
          <el-radio label="2" >移动</el-radio>
          <el-radio label="3" >联通</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="开/关">
        <el-switch v-model="form.open"  label="开/关" />
      </el-form-item>
<!--      <el-form-item label="Activity form">-->
<!--        <el-input v-model="form.desc" type="textarea" />-->
<!--      </el-form-item>-->
<!--      <el-form-item>-->
<!--        <el-button type="primary" @click="onSubmit">Create</el-button>-->
<!--        <el-button @click="onCancel">Cancel</el-button>-->
<!--      </el-form-item>-->
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        code: '',
        region: '',
        date1: '',
        date2: '',
        open: true,
        type: [],
        platform: '1',
        desc: ''
      }
    }
  },
  methods: {
    onSubmit() {
      // this.$message('submit!')
      this.$message(JSON.stringify(this.form));



    },
    onCancel() {
      this.$message({
        message: 'cancel!',
        type: 'warning'
      })
    }
  }
}
</script>

<style scoped>
.line{
  text-align: center
}
</style>

